﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>shoppingcartcnpm - Shop Everything</title>
	<link rel="stylesheet" href="/public/css/admin/general.css" type="text/css" media="screen" />
	<!--[if IE 6]>
		<link rel="stylesheet" href="/public/css/admin/ie6.css" type="text/css" media="screen," />
	<![endif]-->

	<script type="text/javascript" src="/public/js/jquery-1.4.2.min.js"></script>

	<?php 	
		Zend_Session::start(); 
		$defaultNamespace = new Zend_Session_Namespace('Default');
		//var_dump($defaultNamespace->checkout);
	?>
	
</head>

<body>
	<?php if ($defaultNamespace->user->u_role =='admin' || $defaultNamespace->user->u_role =='store_owner') { ?>
		<a href="http://shoppingcartcnpm.orgfree.com"><img border="0" src="/public/img/menu/frog.jpg" alt="Pulpit rock"/></a>
		<embed height="110" width="400" wmode="transparent" type="application/x-shockwave-flash" src="/public/flash/topbanner.swf">
		<h1> Admin Page </h1>
		<div id="container">
			<ul class="menu">
				<li id="news" class="active">News</li>
				<li id="categories">Categories</li>
				<li id="products">Products</li>
				<li id="suppliers">Suppliers</li>
				<? if($defaultNamespace->user->u_role =='admin'){?>
					<li id="users">Users</li> 
					<li id="orders">Orders</li>
				<?}?>
			</ul>
			<span class="clear"></span>
			<div class="content news">
				<h1>Tin Tức</h1>
					<?php echo $this->render('news/listnews.phtml'); ?>
			</div>
			<div class="content categories">
				<h1>List Category</h1>
				<?php echo $this->render('category/_categoryTree.phtml'); ?>
			</div>
			 
			<div class="content products">
				<h1>Danh mục mặt hàng</h1>
				<?php echo $this->render('product/_product.phtml');?>
			</div>

			<div class="content suppliers">
				<h1>Nhà cung cấp</h1>
				<?php //echo $this->addSuppliersForm ?>
				<?php echo $this->render('supplier/_suppliers.phtml'); ?>
			</div>		
			
			<? if($defaultNamespace->user->u_role =='admin'){?>
				<div class="content users">
					<h1>Khách hàng</h1>
					<?php echo $this->render('user/users.phtml'); ?>
				</div>
				
				<div class="content orders">
					<h1>Các Đơn Đặt Hàng</h1>
					<?php echo $this->render('order/orders.phtml'); ?>
				</div>	
			<?}?>	
		</div>
	<?php }
	else {
		echo "<h1><b> Bạn không có quyền truy cập trang web này :D.</h1><b>";
	}
	?>
		<script type="text/javascript" src="/public/js/admin/tabs.js"></script>
</body>
			
</html>